Update Terraform docs for `pagerduty_service` so `scheduled_actions` is not required

The docs for scheduled_actions says that we must specify at least one scheduled_actions block:

When using type = "use_support_hours" in incident_urgency_rule you must specify at least one (otherwise optional) scheduled_actions block. The block contains the following arguments

However this doesn’t seem like it’s required:

resource "pagerduty_service" "example" {
  name = "Example Service"
  escalation_policy = pagerduty_escalation_policy.example.id

  incident_urgency_rule {
    type = "use_support_hours"

    during_support_hours {
      type = "constant"
      urgency = "high"
    }

    outside_support_hours {
      type = "constant"
      urgency = "severity_based"
    }
  }

  support_hours {
    type = "fixed_time_per_day"
    time_zone = "America/Los_Angeles"
    days_of_week = [1,2,3,4,5]
    start_time = "09:00:00"
    end_time = "17:00:00"
  }

It looks like you’re correct – no block is required. We’ve reached out internally to have the documentation corrected.

1 Like